

run "C:\Users\tjb0217\Box Sync\Tyler\One off tasks\EHB Revision - 10012019\adjustq.ado"

global data "C:\Users\tjb0217\Box Sync\Tyler\One off tasks\EHB Revision - 10012019\raw"

// replacing "." to "_" in outcome variables
foreach dataset in 3.1 3.2 4.1 4.2 4.3 5.1 5.2 6.2 6.3 6.5 {
	use "$data\MH_`dataset'.dta", clear
	replace outcome = subinstr(outcome, ".", "_", .)
	save "$data\MH_`dataset'.dta", replace
}



**AGRICULTURE**

use "$data\MH_3.1.dta", clear

keep if id==10 | id==8 | id==6

adjustq, pval(pval) outcome(outcome) q(qval) replace
sort id 
save "$data\out\MH_3.1.inputsq.dta", replace

	**LAND**

use "$data\MH_3.2.dta", clear
keep if id==24 | id==26

adjustq, pval(pval) outcome(outcome) q(qval) replace

sort id
save "$data\out\MH_3.2landq.dta", replace

	**INPUTS**
use "$data\MH_3.2.dta", clear

keep if id==30 | id==28 | id==26

adjustq, pval(pval) outcome(outcome) q(qval) replace

sort id
save "$data\out\MH_3.2inputsq.dta", replace



**KNOWLEDGE--Post-program**

	**BREASTFEEDING KNOWLEDGE**

use "$data\MH_4.1.dta", clear

keep if id<66

adjustq, pval(pval) outcome(outcome) q(qval) replace
sort id
save "$data\out\MH_4.1feedingq.dta", replace

	**Foods**
use "$data\MH_4.1.dta", clear

keep if id<70 & id>65

adjustq, pval(pval) outcome(outcome) q(qval) replace
sort id
save "$data\out\MH_4.1foodq.dta", replace

	**Diarrhea**
	
use "$data\MH_4.1.dta", clear

keep if id>73

adjustq, pval(pval) outcome(outcome) q(qval) replace
sort id
save "$data\out\MH_4.1diarrheaq.dta", replace	


**KNOWLEDGE--OVERALL IMPACTS**
	**BREASTFEEDING KNOWLEDGE**
use "$data\MH_4.2.dta", clear

keep if id<82

adjustq, pval(pval) outcome(outcome) q(qval) replace
sort id
save "$data\out\MH_4.2feedingq.dta", replace	

	**Foods**

use "$data\MH_4.2.dta", clear

keep if id>81 & id<86

adjustq, pval(pval) outcome(outcome) q(qval) replace
sort id
save "$data\out\MH_4.2foodq.dta", replace
	
	**HAND WASHING**	
	
use "$data\MH_4.2.dta", clear

keep if id>85 & id<90

adjustq, pval(pval) outcome(outcome) q(qval) replace
sort id
save "$data\out\MH_4.2handsq.dta", replace	
	
**SPILLOVER**

	**DIARRHEA**		

use "$data\MH_4.3.dta", clear

keep if id>105	

adjustq, pval(pval) outcome(outcome) q(qval) replace


**PRACTICES**

	**SPILLOVER**
	**BREASTFEEDING**
	
use "$data\MH_5.1.dta", clear
keep if id<114
adjustq, pval(pval) outcome(outcome) q(qval) replace

save "$data\out\MH_5.1q.dta", replace

use "$data\MH_5.2.dta", clear
keep if id<120
adjustq, pval(pval) outcome(outcome) q(qval) replace
save "$data\out\MH_5.2q.dta", replace

**NUTRITION**
**SPILLOVER**
	**ANEMIA**
	
use "$data\MH_6.2.dta", clear
keep if id<134
adjustq, pval(pval) outcome(outcome) q(qval) replace
sort id
save "$data\out\MH_6.2anemiaq.dta", replace	

use "$data\MH_6.2.dta", clear
keep if id>133 & id<137
adjustq, pval(pval) outcome(outcome) q(qval) replace
sort id
save "$data\out\MH_6.2anemiaq3_5.9.dta", replace

	
use "$data\MH_6.3.dta", clear
keep if id<147 & id>143

adjustq, pval(pval) outcome(outcome) q(qval) replace
sort id
save "$data\out\MH_6.3anemiaq.dta", replace	
	
	**WASTING**
use "$data\MH_6.3.dta", clear
keep if id==148 | id==150

adjustq, pval(pval) outcome(outcome) q(qval) replace
sort id
save "$data\out\MH_6.3wastingq.dta", replace


	**ANEMIA--WITHIN VILLAGE**
use "$data\MH_6.5.dta", clear
keep if id<164

adjustq, pval(pval) outcome(outcome) q(qval) replace
sort id
save "$data\out\MH_6.5q.dta", replace
